package com.mycar2w.cloud.entity;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * created time 2017/4/1
 *
 * @author ljc
 * @version V1.0
 * 汽车引擎参数
 */
@Entity
@Table(name = "car_engine_parameter", schema = "mycar2wnew", catalog = "")
public class CarEngineParameter {
    private Long id;
    private String displacement;
    private String intakeForm;
    private String cylinder;
    private String maximumHorsepower;
    private String maximumTorque;
    private String fuelType;
    private String fuelLabel;
    private String oilSupplyMode;
    private String emissionStandard;
    private Long carId;

    @Id
    @Column(name = "id", nullable = false)
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Basic
    @Column(name = "displacement", nullable = true, length = 50)
    public String getDisplacement() {
        return displacement;
    }

    public void setDisplacement(String displacement) {
        this.displacement = displacement;
    }

    @Basic
    @Column(name = "intake_form", nullable = true, length = 50)
    public String getIntakeForm() {
        return intakeForm;
    }

    public void setIntakeForm(String intakeForm) {
        this.intakeForm = intakeForm;
    }

    @Basic
    @Column(name = "cylinder", nullable = true, length = 50)
    public String getCylinder() {
        return cylinder;
    }

    public void setCylinder(String cylinder) {
        this.cylinder = cylinder;
    }

    @Basic
    @Column(name = "maximum_horsepower", nullable = true, length = 50)
    public String getMaximumHorsepower() {
        return maximumHorsepower;
    }

    public void setMaximumHorsepower(String maximumHorsepower) {
        this.maximumHorsepower = maximumHorsepower;
    }

    @Basic
    @Column(name = "maximum_torque", nullable = true, length = 50)
    public String getMaximumTorque() {
        return maximumTorque;
    }

    public void setMaximumTorque(String maximumTorque) {
        this.maximumTorque = maximumTorque;
    }

    @Basic
    @Column(name = "fuel_type", nullable = true, length = 50)
    public String getFuelType() {
        return fuelType;
    }

    public void setFuelType(String fuelType) {
        this.fuelType = fuelType;
    }

    @Basic
    @Column(name = "fuel_label", nullable = true, length = 50)
    public String getFuelLabel() {
        return fuelLabel;
    }

    public void setFuelLabel(String fuelLabel) {
        this.fuelLabel = fuelLabel;
    }

    @Basic
    @Column(name = "oil_supply_mode", nullable = true, length = 50)
    public String getOilSupplyMode() {
        return oilSupplyMode;
    }

    public void setOilSupplyMode(String oilSupplyMode) {
        this.oilSupplyMode = oilSupplyMode;
    }

    @Basic
    @Column(name = "emission_standard", nullable = true, length = 50)
    public String getEmissionStandard() {
        return emissionStandard;
    }

    public void setEmissionStandard(String emissionStandard) {
        this.emissionStandard = emissionStandard;
    }

    @Basic
    @Column(name = "car_id", nullable = true)
    public Long getCarId() {
        return carId;
    }

    public void setCarId(Long carId) {
        this.carId = carId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        CarEngineParameter that = (CarEngineParameter) o;

        if (id != null ? !id.equals(that.id) : that.id != null) return false;
        if (displacement != null ? !displacement.equals(that.displacement) : that.displacement != null) return false;
        if (intakeForm != null ? !intakeForm.equals(that.intakeForm) : that.intakeForm != null) return false;
        if (cylinder != null ? !cylinder.equals(that.cylinder) : that.cylinder != null) return false;
        if (maximumHorsepower != null ? !maximumHorsepower.equals(that.maximumHorsepower) : that.maximumHorsepower != null)
            return false;
        if (maximumTorque != null ? !maximumTorque.equals(that.maximumTorque) : that.maximumTorque != null)
            return false;
        if (fuelType != null ? !fuelType.equals(that.fuelType) : that.fuelType != null) return false;
        if (fuelLabel != null ? !fuelLabel.equals(that.fuelLabel) : that.fuelLabel != null) return false;
        if (oilSupplyMode != null ? !oilSupplyMode.equals(that.oilSupplyMode) : that.oilSupplyMode != null)
            return false;
        if (emissionStandard != null ? !emissionStandard.equals(that.emissionStandard) : that.emissionStandard != null)
            return false;
        if (carId != null ? !carId.equals(that.carId) : that.carId != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id != null ? id.hashCode() : 0;
        result = 31 * result + (displacement != null ? displacement.hashCode() : 0);
        result = 31 * result + (intakeForm != null ? intakeForm.hashCode() : 0);
        result = 31 * result + (cylinder != null ? cylinder.hashCode() : 0);
        result = 31 * result + (maximumHorsepower != null ? maximumHorsepower.hashCode() : 0);
        result = 31 * result + (maximumTorque != null ? maximumTorque.hashCode() : 0);
        result = 31 * result + (fuelType != null ? fuelType.hashCode() : 0);
        result = 31 * result + (fuelLabel != null ? fuelLabel.hashCode() : 0);
        result = 31 * result + (oilSupplyMode != null ? oilSupplyMode.hashCode() : 0);
        result = 31 * result + (emissionStandard != null ? emissionStandard.hashCode() : 0);
        result = 31 * result + (carId != null ? carId.hashCode() : 0);
        return result;
    }
}
